/*
 * Copyright 2023, Haiku, Inc. All rights reserved.
 * Distributed under the terms of the MIT License.
 *
 * Authors:
 *		Haiku Development Team
 */

#include <asm_defs.h>

/* uint64 __swap_int64(uint64 value)
 *                     value = r4
 */
SYMBOL(__swap_int64):
	revb.d	$a0, $a0
	ret

/* uint32 __swap_int32(uint32 value)
 *                     value = r4
 */
SYMBOL(__swap_int32):
	revb.w	$a0, $a0
	ret

/* uint16 __swap_int16(uint16 value)
 *                     value = r4
 */
SYMBOL(__swap_int16):
	revb.h	$a0, $a0
	ret

/* uint64 __swap_int64_pair(uint64 low, uint64 high)
 *                          low = r4, high = r5
 */
SYMBOL(__swap_int64_pair):
	revb.d	$a0, $a0
	revb.d	$a1, $a1
	ret